package com.qijian.maindata.domain.query;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Set;


/**
 * 下料转运明细对象 查询条件类
 *
 * @author qijian
 * @date 2024-05-31
 */

@Data
@ToString
@TableName("main_nc_order_transport_detail")
public class NcOrderTransportDetailQuery {

    @WhereType(filed = "id")
    private Long id;
    @WhereType(filed = "main_id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "detail_id")
    private Long detailId;
    @WhereType(filed = "detail_id", type = WhereTypeEnum.NOTIN)
    private Set<Long> idsNot;
    @WhereType(filed = "order_id")
    private Long orderId;
    @WhereType(filed = "nc_id")
    private Long ncId;
    @WhereType(filed = "quantity")
    private Long quantity;
    @WhereType(filed = "in_quantity")
    private BigDecimal inQuantity;
    @WhereType(filed = "diff_quantity")
    private BigDecimal diffQuantity;
    @WhereType(filed = "wages")
    private BigDecimal wages;
    @WhereType(filed = "item_id")
    private Long itemId;
    @WhereType(filed = "item_code")
    private String itemCode;
    @WhereType(filed = "item_name")
    private String itemName;
    @WhereType(filed = "project_id")
    private Long projectId;
    @WhereType(filed = "project_no", type = WhereTypeEnum.LIKE)
    private String projectNo;
    @WhereType(filed = "project_name")
    private String projectName;
    @WhereType(filed = "machine_no", type = WhereTypeEnum.LIKE)
    private String machineNo;
    @WhereType(filed = "part_no", type = WhereTypeEnum.LIKE)
    private String partNo;
    @WhereType( filed = "drawing_no", type = WhereTypeEnum.LIKE)
    private String drawingNo;
    @WhereType(filed = "item_weight")
    private BigDecimal itemWeight;
    @WhereType(filed = "use_item_name")
    private String useItemName;
    @WhereType(filed = "use_item_remark")
    private String useItemRemark;
    @WhereType(filed = "bom_id")
    private Long bomId;
    @WhereType(filed = "process_name")
    private String processName;
    @WhereType(filed = "order_code", type = WhereTypeEnum.LIKE)
    private String orderCode;
    @WhereType(filed = "order_type")
    private String orderType;
    @WhereType(filed = "cutt_type")
    private String cuttType;
    @WhereType(filed = "dept_name")
    private String deptName;

    @WhereType(filed = "status", tableName = "main_nc_order_transport", type = WhereTypeEnum.EQ)
    private String status;

    @WhereType(filed = "code", tableName = "main_nc_order_transport", type = WhereTypeEnum.LIKE)
    private String code;

    @WhereType(filed = "diff", tableName = "main_nc_order_transport", type = WhereTypeEnum.EQ)
    private Boolean diff;

    @WhereType(filed = "itemAttr", type = WhereTypeEnum.LIKE, func = "JSON_CONTAINS(item_attr, JSON_OBJECT('name', '厚', 'value', {1}))")
    private BigDecimal itemAttr;


    @WhereType(filed = "remark", type = WhereTypeEnum.LIKE, func = "JSON_CONTAINS(item_attr, JSON_OBJECT('name', '材质', 'value', {1}))")
    private String materialNew;

    @WhereType(filed = "transport_type",tableName = "main_nc_order_transport")
    private String transportType;

    @WhereType(filed = "id",tableName = "main_nc_order_transport")
    private Long exportId;

    @WhereType(ignore = true)
    private Integer exportType;

    @WhereType(ignore = true)
    private String idsStr;
}
